# coding: utf-8

from os import path
import nonebot as nb
import nonebotConfig as nbconf

if __name__ == '__main__':
    try:
        nb.init(nbconf)
        nb.load_plugins(
            path.join(path.dirname(__file__), 'awesome', 'plugins'), 'awesome.plugins'
        )
        nb.run()
    except KeyboardInterrupt:
        nb.logger.info("进程被用户终止.")
    except Exception as e:
        nb.logger.warn(e.__repr__())